import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Text2 {
    public static void main(String[] args) {
        /* 班级里有N个学生
           要求：
           70%的概率随机到男生
           30%的概率随机到女生
        */
        //1111111000
        //1:男   0:女
        ArrayList<Integer> list=new ArrayList<>();
        Collections.addAll(list,1,1,1,1,1,1,1,0,0,0);
        Collections.shuffle(list);
        Random r=new Random();
        int index=r.nextInt(list.size());
        int number=list.get(index);
        ArrayList<String> boy=new ArrayList<>();
        ArrayList<String> girl=new ArrayList<>();
        Collections.addAll(boy,"男1","男2","男3","男4","男5","男6","男7");
        Collections.addAll(girl,"女1","女2","女3");
        if(number==1)//男生中选
        {
                int boyIndex=r.nextInt(boy.size());
                String name=boy.get(boyIndex);
            System.out.println(name);
        }
        else//女生中选
        {
                int girlIndex=r.nextInt(girl.size());
                String name=girl.get(girlIndex);
            System.out.println(name);
        }
    }
}
